package Sequence;

public class Test0674 {
}

class Solution0674_1 {
    public int findLengthOfLCIS(int[] nums) {
        int length = nums.length;
        if (length == 0) return 0;

        int ans = 1;
        int[] dp = new int[length];
        dp[0] = 1;

        for (int i = 1; i < length; i++) {
            int num = nums[i];

            if (num > nums[i-1]) dp[i] = dp[i-1] + 1;
            else dp[i] = 1;

            ans = Math.max(ans,dp[i]);
        }

        return ans;
    }
}
